package com.codeczx.customviewdemo;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;

import com.codeczx.customviewdemo.customweekview.CustomWeekActivity;
import com.codeczx.customviewdemo.limitedscroller.LimitedScrollerActivity;
import com.codeczx.customviewdemo.taglayout.TagLayoutActivity;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class MainActivity extends AppCompatActivity {

    @BindView(R.id.btn_tv)
    Button btnTv;
    @BindView(R.id.btn_xx)
    Button btnXx;
    @BindView(R.id.btn_easy_linear_layout)
    Button btnEasyLinearLayout;
    @BindView(R.id.btn_easy_relative_layout)
    Button btnEasyRelativeLayout;
    @BindView(R.id.btn_tag_layout)
    Button btnTagLayout;
    @BindView(R.id.btn_horse_race_lamp)
    Button btnHorseRaceLamp;
    @BindView(R.id.btn_custom_week_view)
    Button btnCustomWeekView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        ButterKnife.bind(this);
    }

    @OnClick({R.id.btn_tv, R.id.btn_xx, R.id.btn_easy_linear_layout, R.id.btn_easy_relative_layout,
            R.id.btn_tag_layout, R.id.btn_horse_race_lamp,R.id.btn_custom_week_view})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.btn_tv:
                startActivity(new Intent(MainActivity.this, TextViewActivity.class));
                break;
            case R.id.btn_xx:
                break;
            case R.id.btn_easy_linear_layout:
                startActivity(new Intent(MainActivity.this, EasyLinearLayoutActivity.class));
                break;
            case R.id.btn_easy_relative_layout:
                startActivity(new Intent(MainActivity.this, EasyRelativeLayoutActivity.class));
                break;
            case R.id.btn_tag_layout:
                startActivity(new Intent(MainActivity.this, TagLayoutActivity.class));
                break;
            case R.id.btn_horse_race_lamp:
                startActivity(new Intent(MainActivity.this, LimitedScrollerActivity.class));
                break;
            case R.id.btn_custom_week_view:
                startActivity(new Intent(MainActivity.this, CustomWeekActivity.class));
                break;
        }
    }


}
